package ZY11_09;

import java.util.Scanner;

public class Mingming {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入作业名称：");
        String name=in.next();
        boolean name1 = false;
        int index = name.lastIndexOf(".");
        if(index!=-1 && name.substring(index).equals(".rar")|| name.substring(index).equals(".zip")){
            System.out.println("提交成功");
            name1 = true;
        }else{
            System.out.println("文件名无效！请重新提交！");
        }

    }
}
